let t = require;
let e = module;
let o = e.exports;
o.default = e.exports;

('use strict');
console.log('start'),
  Object.defineProperty(o, '__esModule', {
    value: !0
  }),
  (o.SdkType = void 0);
var n,
  i = t('DefaultSdk'),
  r = t('DefaultWxSdk'),
  a = t('NominoXWxSdk');
(function (t) {
  (t[(t.Def = 0)] = 'Def'),
    (t[(t.WX = 1)] = 'WX'),
    (t[(t.QQ = 2)] = 'QQ'),
    (t[(t.TikTo = 3)] = 'TikTo'),
    (t[(t.NominoX_WX = 4)] = 'NominoX_WX'),
    (t[(t.NominoX_TT = 5)] = 'NominoX_TT'),
    (t[(t.NominoX_Client = 6)] = 'NominoX_Client');
})((n = o.SdkType || (o.SdkType = {})));
var s = (function () {
  function t() {}
  return (
    Object.defineProperty(t, 'sdk', {
      get: function get() {
        return this._sdk;
      },
      enumerable: !1,
      configurable: !0
    }),
    Object.defineProperty(t, 'sdkType', {
      get: function get() {
        return this._sdkType;
      },
      enumerable: !1,
      configurable: !0
    }),
    (t.init = function (e) {
      void 0 === e && (e = n.Def);
      var o = window.location.search,
        i = {};
      if (((t._sdkType = e), o && o.indexOf('?') >= 0)) {
        var r = o.substr(1, o.length).split('&'),
          a = r.length;
        if (a > 0)
          for (var s = 0; s < a; s++) {
            var c = r[s],
              l = c.indexOf('='),
              u = c.substr(0, l),
              h = c.substr(l + 1, c.length);
            'sdkType' != u
              ? (i[u] = decodeURIComponent(h))
              : (t._sdkType = parseInt(decodeURIComponent(h)));
          }
      }
      0 == t._sdkType &&
        window.sdkType &&
        (t._sdkType = parseInt(window.sdkType)),
        t.initSDK(i);
    }),
    (t.initSDK = function (e) {
      switch (t.sdkType) {
        // case n.WX:
        //   t._sdk = new r.DefaultWxSdk(e, t.sdkType, '1001');
        //   break;

        // case n.NominoX_WX:
        //   t._sdk = new a.NominoXWxSdk(e, t.sdkType, '2001');
        //   break;

        default:
          t._sdk = new i.default(e, t.sdkType);
      }
    }),
    Object.defineProperty(t, 'company', {
      get: function get() {
        return t.sdk ? t.sdk.company : '';
      },
      enumerable: !1,
      configurable: !0
    }),
    Object.defineProperty(t, 'copyright', {
      get: function get() {
        return t.sdk ? t.sdk.copyright : '';
      },
      enumerable: !1,
      configurable: !0
    }),
    Object.defineProperty(t, 'showCounsel', {
      get: function get() {
        return !t.sdk || t.sdk.showCounsel;
      },
      enumerable: !1,
      configurable: !0
    }),
    Object.defineProperty(t, 'isLoginSuccess', {
      get: function get() {
        return !!t.sdk && t.sdk.isLoginSuccess;
      },
      enumerable: !1,
      configurable: !0
    }),
    Object.defineProperty(t, 'isNewUser', {
      get: function get() {
        return !!t.sdk && t.sdk.isNewUser;
      },
      enumerable: !1,
      configurable: !0
    }),
    (t.login = function () {
      t.sdk && t.sdk.login();
    }),
    (t.logout = function () {
      t.sdk && t.sdk.logout();
    }),
    (t.postMessage = function (e) {
      for (var o = [], n = 1; n < arguments.length; n++) {
        o[n - 1] = arguments[n];
      }
      t.sdk && t.sdk.postMessage(e, o);
    }),
    (t.share = function () {
      t.sdk && t.sdk.share();
    }),
    (t.videoAdBuy = function (e, o, n, i) {
      void 0 === n && (n = null),
        void 0 === i && (i = null),
        t.sdk && t.sdk.videoAdBuy(e, o, n, i);
    }),
    (t.showVideoAd = function (e, o) {
      void 0 === e && (e = null),
        void 0 === o && (o = null),
        t.sdk && t.sdk.showVideoAd(e, o);
    }),
    (t.hideVideoAd = function () {
      t.sdk.hideVideoAd();
    }),
    (t.sidebar = function () {
      t.sdk.sidebar();
    }),
    (t.umEvent = function (e, o) {
      t._sdk && t._sdk.umEvent(e, o);
    }),
    (t.saveData = function (e) {
      t.sdk && t.sdk.saveUserData(e);
    }),
    t
  );
})();
(o.default = s), console.log('end');
module.exports = e.exports;
